<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<div style="height: 400px; position: fixed; width: 400px; top: 500px;">
<br />Fixed.......................
<br />Fixed.......................
<br />Fixed.......................
<br />Fixed.......................
<br />Fixed.......................
<br />Fixed.......................
<br />Fixed.......................
</div>
<div style="height: 2000px"></div>
<script>
var testFix = async_test('Selection-autoscroll should not be triggered when the selection is in a fixed-position element');
testFix.step(function() {
    if (!window.eventSender)
        return;
    var dragStartX = 50;
    var dragStartY = 550;
    var dragEndX = 60;
    var dragMoveY = 580;
    var dragEndY = 820;

    eventSender.dragMode = false;
    eventSender.mouseMoveTo(dragStartX, dragStartY);
    eventSender.mouseDown();
    eventSender.mouseMoveTo(dragEndX, dragMoveY);
    eventSender.mouseMoveTo(dragEndX, dragEndY);

    requestAnimationFrame(function() {
        assert_equals(document.body.scrollTop, 0);
        testFix.done();
    });
});
</script>
